module.exports={
    add(data){
        return request({
            url: '/module',
            headers: {},
            method: 'post',
            data: data
        });
    },
    edit(data){
        return request({
            url: '/module',
            headers: {},
            method: 'put',
            data: data
        });
    },
    remove(data){
        return request({
            url: '/module/'+data,
            headers: {},
            method: 'delete'
        });
    },
    getCode(){
        return request({
            url: '/module/code',
            headers: {},
            method: 'get',
        });
    },
    treeList(data){
        return request({
            url: '/module/treeList',
            headers: {},
            method: 'get',
            params: data
        });
    },
    getOrderNum(pid){
        return request({
            url: '/module/'+pid+'/order-num',
            headers: {},
            method: 'get'
        });

    },
    getModules(){
        return request({
            url: '/module/module',
            headers: {},
            method: 'get'
        });

    }
}
